package com.example.demo.mapper;

import com.example.demo.entity.ArticleAndReport;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

/**
 * <p>
 * 举报文章表 Mapper 接口
 * </p>
 *
 * @author Mr.sdy
 * @since 2024-06-12
 */
@Mapper
public interface ArticleAndReportMapper extends BaseMapper<ArticleAndReport> {
    /**
     * 添加举报文章
     * @param articleAndReport
     * @return
     */
    @Insert("insert into article_and_report(article_id,user_id,report_id,create_time,author_id) values(#{articleId},#{userId},#{reportId},NOW(),#{authorId})")
    int insertArticleAndReport(ArticleAndReport articleAndReport);
}
